mod bom;
mod cat;
mod common;

use structopt::StructOpt;

#[derive(StructOpt)]
#[structopt(name = "yfs", about = "文件操作类工具")]
enum Fs {
    /// 打印文件内容
    Cat(cat::Cat),
    /// 文件 BOM 头操作
    Bom(bom::Bom),
}

pub fn fs() {
    let fs = Fs::from_args();
    match fs {
        Fs::Cat(cat) => cat::handle_cat(cat),
        Fs::Bom(bom) => bom::handle_bom(bom),
    }
}